<?php
// 编辑
$id=$_GET['id'];
$sql="select * from relation where id={$id}";
$rst=$mysqli->query($sql);
$row=$rst->fetch_assoc();

?>

<form action="info/update.php" method="post" >
	<div>
		<label>姓名</label><input type="text" name="name" value="<?php echo $row['name']?>">
	</div>
	<div>
		<label>地址</label><input type="text" name="addr" value="<?php echo $row['addr']?>">
	</div>
	<div>
		<label>电话</label><input type="text" name="tel" value="<?php echo $row['tel']?>">
	</div>
	<div>
		<label>邮箱</label><input type="text" name="email" value="<?php echo $row['email']?>">
	</div>
	<input type="hidden" name="id" value="<?php echo $row['id']?>">
	<button type="submit">提交</button>
</form>